package com.example.springbootsfzy.service.lishenao;

import com.example.springbootsfzy.domain.ConsultantCertificates;
import com.example.springbootsfzy.mapper.ConsultantCertificatesMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

//咨询师证书表
@Service
public class Consultant_certificatesService {
    @Autowired
    private ConsultantCertificatesMapper consultantCertificatesMapper;
    //根据咨询师id查询咨询师证书
    public ConsultantCertificates selectByConsultantId(Long consultantId){
        return consultantCertificatesMapper.selectByPrimaryKey(consultantId);
    }
    //添加咨询师证书
    public int insert(ConsultantCertificates consultantCertificates){
        return consultantCertificatesMapper.insert(consultantCertificates);
    }
    //更新咨询师证书
    public int update(ConsultantCertificates consultantCertificates){
        return consultantCertificatesMapper.updateByPrimaryKeySelective(consultantCertificates);
    }
    //删除咨询师证书
    public int delete(Long id){
        return consultantCertificatesMapper.deleteByPrimaryKey(id);
    }
}
